package com.luyue.zagj;

import android.app.Application;

import java.util.HashSet;
import java.util.Set;

import cn.jpush.android.api.JPushInterface;

/**
 * Created by  on 16/8/12.
 */
public class MyApplication extends Application {

    public static MyApplication myApplication;

    public synchronized static Application getContext() {
        if (myApplication==null){
             myApplication=new MyApplication();
        }
       return myApplication;
    }

    @Override
    public void onCreate() {
        super.onCreate();

        myApplication = this;
        //初始化sdk
        JPushInterface.setDebugMode(true);//正式版的时候设置false，关闭调试
        JPushInterface.init(this);
        //建议添加tag标签，发送消息的之后就可以指定tag标签来发送了
        Set<String> set = new HashSet<>();
        set.add("azgj");//名字任意，可多添加几个
        JPushInterface.setTags(this, set, null);//设置标签

    }


}
